﻿@model EM.OA.Portal.Models.WorkPlanModels
@{
    Layout = "~/Views/Shared/_LayoutContent.cshtml";
}
<script type="text/javascript" src="~/Scripts/page/DailyWork/WorkPlan.js"></script>

<div class="easyui-layout" style="height: 500px; overflow: hidden;">
    <div data-options="region:'west',split:true,title:'工作计划'" style="width: 150px; padding: 10px;">
        <ul id="planTypeTree" class="easyui-tree">
        </ul>
    </div>
    <div data-options="region:'center',title:''">
        @*list*@
        <table id="list" class="easyui-datagrid" toolbar="#toolbar">
        </table>
    </div>
</div>

<div id="toolbar">
    <a href="#" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="add()">增加</a>
    <a href="#" class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="edit()">修改</a>
    <a href="#" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="del()">删除</a>
    <div id="tb" style="padding: 3px">
        <span>@Html.LabelFor(m => m.WorkPlanName)</span>
        <input id="WorkPlanName">
        <a href="#" class="easyui-linkbutton" plain="true" onclick="doSearch()">查询</a>
    </div>

</div>

@*Detail*@
<div id="dlg" class="easyui-dialog" style="width: 800px; height: 400px; padding: 10px 20px; z-index: auto"
    closed="true" buttons="#dlg-buttons" modal="true" resizable="true"
    data-options="
    onOpen:function() { 
    keditor1 =  KindEditor.create('#WorkPlanContent',{
    items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']    }); 
     keditor2 =  KindEditor.create('#WorkPlanSummary',{
    items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']    }); 

     },
    

     


    onBeforeClose:function() { 
    keditor1.html(''); 
     keditor2.html(''); 
    keditor1.remove('#WorkPlanContent');
    keditor2.remove('#WorkPlanSummary');
    }
    ">
    <div id="dlg-buttons">
        <a href="#" class="easyui-linkbutton" iconcls="icon-ok" onclick="save()">保存</a>
        <a href="#" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">取消</a>
    </div>
    <form id="fm" method="post">
        @Html.HiddenFor(m => m.WorkPlanID)
        @Html.Hidden("refID", @ViewData["refID"].ToString())
        <div>
            @Html.LabelFor(m => m.WorkPlanName)
            <input name="WorkPlanName" class="easyui-validatebox" data-options="required:true,validType:'length[1,100]'">
        </div>
        <div>
            @Html.LabelFor(m => m.WorkPlanType)
            @Html.DropDownListFor(m => m.WorkPlanType, new EM.OA.Portal.Models.WorkPlanModels().GetListItems("WorkPlanKind"), new { @class = "easyui-combobox" })
        </div>
        <div>
            @Html.LabelFor(m => m.WorkPlanStartTime)
            <input name="WorkPlanStartTime" class="easyui-datebox" data-options="required:true">
        </div>

        <div>
            @Html.LabelFor(m => m.ShareUsers)
            <input type="hidden" id="ShareUsers" name="ShareUsers" />
            <input class="easyui-validatebox" type="text" id="ShareUsersName" name="ShareUsersName" />
            <a href="#" class="easyui-linkbutton" onclick="GetUserList()" plain="true">选择</a>
        </div>
        <div>
            @Html.LabelFor(m => m.WorkPlanContent)
            <textarea id="WorkPlanContent" name="WorkPlanContent" style="width: 700px; height: 300px;" required="true" class="easyui-validatebox"></textarea>

        </div>
        <div>
            @Html.LabelFor(m => m.WorkPlanSummary)
            <textarea  id="WorkPlanSummary"  name="WorkPlanSummary" style="width: 700px; height: 300px;"></textarea>
        </div>
        <div>
            <iframe id="frmUploadFile" style="border: 0px; width: 100%;" src="Attachment/Index?refID=@ViewData["refID"]"></iframe>
        </div>
    </form>
    @*是否单选,用于保存选择的用户ID的控件ID，用于保存选择的用户名称的控件ID*@
    @Html.Partial("_OrgUserPartial", new List<object> { false, "ShareUsers", "ShareUsersName" })
</div>

